import pandas as pd
import numpy as np
import pymysql as mysql

def MySqlConnect(host, port, user, passwd, db):
    connect = mysql.connect(
        host= host,
        port= port,
        user= user,
        password=passwd,
        database=db,
        charset='utf8'
    )
    return connect

conn = MySqlConnect('localhost',3306,'root','zhang3916','zto');

with conn.cursor() as cursor:
    cursor.execute('select * from PRSiteAssess as a where a.SiteName = "聊城阳谷县"')
    pd = cursor.fetchall()
    for row in pd:
        print(row)

conn.close()